//groovy -Dhttp.proxyHost=host GrapeDemo.groovy
import org.apache.commons.lang.builder.*
@Grab(group='commons-lang', module='commons-lang', version='2.4')
def download() {}
println(ToStringBuilder.reflectionToString(this))

/*
To Use Maven2 local repository:
Edit ~/.groovy/grapeConfig.xml, and add

<ibiblio name="local" root="file:${user.home}/.m2/repository/" m2compatible="true"/>

A more complete example:
<?xml version="1.0"?>
<ivysettings>
    <settings defaultResolver="downloadGrapes"/>
    <resolvers>
        <chain name="downloadGrapes">
            <!-- todo add 'endorsed groovy extensions' resolver here -->
            <ibiblio name="local" root="file:${user.home}/.m2/repository/" m2compatible="true"/>
            <filesystem name="cachedGrapes">
                <ivy pattern="${user.home}/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml"/>
                <artifact pattern="${user.home}/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
            </filesystem>
            <ibiblio name="codehaus" root="http://repository.codehaus.org/" m2compatible="true"/>
            <ibiblio name="ibiblio" m2compatible="true"/>
            <ibiblio name="java.net2" root="http://download.java.net/maven/2/" m2compatible="true"/>
        </chain>
    </resolvers>
</ivysettings>
*/
